<%-- 
    Document   : formAjoutPromo
    Created on : 23 mars 2013, 08:02:37
    Author     : ali
--%>



<%@page import="EDT.obj.Intervenant"%>
<%@page import="EDT.obj.Ec"%>
<%@page import="java.util.ArrayList"%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                
        <title>Affecter un ec à un intervenant</title>
            <link rel="stylesheet" href="Accueil.css" />
            <link rel="SHORTCUT ICON" href="./edt.jpg" />
    </head>


    <body>    
         
    <section>
      

        

        
         
    <!--<form method='POST' action='PromoNivGradForm.do'> -->
   <%
     String form ="";
    ArrayList<Ec> ec = new ArrayList<Ec>();
    
    ArrayList<Intervenant> interv = new ArrayList<Intervenant>();
    
        ec = EDT.api.API.getEc((String)session.getAttribute("key"));
        interv =  EDT.api.API.getAllIntervenant();
        
        form += "<form method='POST' action='AffectEcIntervAct.do' target='section'>";
        form += "<div class='commentaire'>";
        form += "<fieldset>";
        
        form +="<legend> Sélectionnez un Ec puis un intervenant : </legend>";
        
        form +="<input type='hidden' name='key' value='"+session.getAttribute("key")+"' />";
               
        form +="Ec : <select name='ec'>";
         for (Ec e : ec)
        form +="    <option value='"+e.getId()+"'>"+e.getNom()+"</option>";
        form +="</select><br/><br/>";
        
        form +="Intervenant : <select name='interv'>";
        for (Intervenant e : interv)
        form +="    <option value='"+e.getId()+"'>"+e.getPrenom()+" "+ e.getNom()+"</option>";
        form +="</select><br/><br/>";
            
        form +="<input type='submit' value='valider'/><br/>";
        out.println(form);
            
    %>
    
   
    
    
    <html:errors/> 
    
    </fieldset>
    
        
    </div>

    </form>
         
    </section>
    </body>
</html>